package com.edu.service.diningcar;

import com.edu.dao.DiningCarDao;
import com.edu.entity.Diningcar;

import java.sql.SQLException;
import java.util.List;

/**
 * @author ZCN
 * @version 1.0
 * @date 2021/11/23 10:54
 */
public class DiningCarServiceImpl implements DiningCarService {
    private DiningCarDao diningCarDao = new DiningCarDao();

    @Override
    public void insert(Diningcar diningcar) throws SQLException {
        diningCarDao.insert(diningcar);
    }

    @Override
    public List<Diningcar> selectByUserid(Integer userid) throws SQLException {
        return diningCarDao.selectByUserid(userid);
    }

    @Override
    public void updateFlagtoconsum(String ids) throws SQLException {
        diningCarDao.updateFlagtoconsum(ids);
    }

    @Override
    public Diningcar selectById(Integer id) throws SQLException {
        return diningCarDao.selectById(id);
    }
}
